<template>
	<div>首页</div>
	<div>
		<el-table :data="tableData" style="width: 100%">
			<el-table-column label="ID" prop="id"></el-table-column>
			<el-table-column label="姓名" prop="name" width="150"></el-table-column>
			<el-table-column label="籍贯" prop="place"></el-table-column>
		</el-table>
	</div>
</template>
<script setup lang="ts">
import axios from 'axios'
import { tableType } from '@/types/data'
const tableData = ref<tableType[]>()
const getList = async () => {
	const res = await axios.get('/list')
	tableData.value = res.data
}
onMounted(() => {
	getList()
})
</script>
<style scoped></style>
